package org.example.bobofish.user.application.controller;

import org.example.bobofish.user.application.controller.entity.ResponseEntity;
import org.example.bobofish.user.application.facade.UserFacade;
import org.example.bobofish.user.application.facade.entity.GetUserRightsListResponse;
import org.example.bobofish.user.application.facade.entity.LockUserRightsRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * @author : yuxiong
 * @date : 2025/6/17
 */
@Controller
public class UserController {

    @Autowired
    private UserFacade userFacade;

    public ResponseEntity<GetUserRightsListResponse> getUserRightsList(String userId) {
        return ResponseEntity.success(userFacade.getUserRightsList(userId));
    }

    public ResponseEntity<Boolean> operateRights(LockUserRightsRequest userRightsRequest) {
        return ResponseEntity.success(userFacade.operateRights(userRightsRequest));
    }
}
